/*
 * =====================================================================================
 *
 *       Filename:  3.loop.c
 *
 *    Description:  loop
 *
 *        Version:  1.0
 *        Created:  10/10/2010 06:18:35 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  bucunzai (), 
 *        Company:  bucunzai.info
 *
 * =====================================================================================
 */

int loop(int x, int y, int n ){
    int result =0;
    int i;

    for( i = n-1; i >= 0 ; i -= x){
        result += y*x;
    }
    return result;
}
